package com.ihr360.payroll.model.dto.salary.task.period.embeddable;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ihr360.attendance.AttendancePeriodReport;
import com.ihr360.commons.model.meta.table.DynamicCell;
import com.ihr360.payroll.calc.StaffSalaryCalcPeriod;
import com.ihr360.payroll.context.SimpleStaffPayrollInfo;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class StaffSalaryCalcContext implements Serializable {
    /**
     * 基本信息可用于获取税表
     */
    @JsonProperty(value = "pi")
    private SimpleStaffPayrollInfo staffInfo;

    /**
     * 输入的数据部分
     */
    @JsonProperty(value = "in")
    private Map<String, DynamicCell> inputData;

    /**
     * 依赖其他服务的数据部分
     */
    @JsonProperty(value = "ref")
    private Map<String, Map<String, Object>> refData;

    /**
     * 薪资档案部分，包括分段信息
     */
    @JsonProperty(value = "sp")
    private StaffSalaryCalcPeriod spData;

    /**
     * 考勤月报
     */
    @JsonProperty(value = "atm")
    private AttendancePeriodReport atm;

    /**
     * 考勤阶段报告
     */
    @JsonProperty(value = "atps")
    private List<AttendancePeriodReport> atps;

    /**
     * 合并计税依赖计算批次数据
     */
    @JsonProperty(value = "bt")
    private StaffSalarySnapshot basedOnTermSalary;

    public StaffSalaryCalcContext() {
    }

    public StaffSalaryCalcContext(SimpleStaffPayrollInfo staffInfo, Map<String, DynamicCell> inputData, Map<String, Map<String, Object>> refData, StaffSalaryCalcPeriod spData, AttendancePeriodReport atm, List<AttendancePeriodReport> atps,StaffSalarySnapshot basedOnTermSalary) {
        this.staffInfo = staffInfo;
        this.inputData = inputData;
        this.refData = refData;
        this.spData = spData;
        this.atm = atm;
        this.atps = atps;
        this.basedOnTermSalary = basedOnTermSalary;
    }

    public SimpleStaffPayrollInfo getStaffInfo() {
        return staffInfo;
    }

    public void setStaffInfo(SimpleStaffPayrollInfo staffInfo) {
        this.staffInfo = staffInfo;
    }

    public Map<String, DynamicCell> getInputData() {
        return inputData;
    }

    public void setInputData(Map<String, DynamicCell> inputData) {
        this.inputData = inputData;
    }

    public Map<String, Map<String, Object>> getRefData() {
        return refData;
    }

    public void setRefData(Map<String, Map<String, Object>> refData) {
        this.refData = refData;
    }

    public StaffSalaryCalcPeriod getSpData() {
        return spData;
    }

    public void setSpData(StaffSalaryCalcPeriod spData) {
        this.spData = spData;
    }

    public AttendancePeriodReport getAtm() {
        return atm;
    }

    public void setAtm(AttendancePeriodReport atm) {
        this.atm = atm;
    }

    public List<AttendancePeriodReport> getAtps() {
        return atps;
    }


    public void setAtps(List<AttendancePeriodReport> atps) {
        this.atps = atps;
    }

    public StaffSalarySnapshot getBasedOnTermSalary() {
        return basedOnTermSalary;
    }

    public void setBasedOnTermSalary(StaffSalarySnapshot basedOnTermSalary) {
        this.basedOnTermSalary = basedOnTermSalary;
    }
}